package com.focus.xyz.main.pages;

import com.focus.xyz.core.common.keyword.Action;
import com.focus.xyz.core.pages.BasePage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

import java.util.List;

/**
 * Created by chenmeng on 2016/7/27.
 */
public class ApolloHomePage extends BasePage{
    private Action action;

    private static final String url = "http://www.xyz.cn/";

    @FindBy(id = "dev_login_for_insure")
    private WebElement loginBtn;

    public ApolloHomePage(WebDriver driver, Action action) {
        super(driver, action);
        this.action = action;
        PageFactory.initElements(driver,this);
    }

    public void openMainPage() throws Exception{
        openPage(url);
    }

    public void clickLoginBtn() throws Exception{
        action.click(loginBtn);
    }






}
